//============================================================================
// Name        : kojax-ms.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int main() {
	double  vals, errs;
	int nu,i,j,ij,ifts;
	const int n=5, nn=((n-1)*n)/2, maxpts=25000;
	const double abseps=0, releps=0.0005;
	double correl[nn], low[n], up[n], delta[n];
	int infin[n];
	for(i=1;i<n;i++){
		up[i]=2.0;
		low[i]=0.0;
		delta[i]=1.0;
		infin[i]=0;
	}
	for(i=1;i<nn;i++){
		correl[i]=0.75;
	}
	cout << "Test of MVTDST" << endl;
	cout << "Requested Accuracy " << max(abseps,releps) << endl;
	cout << "Number of Dimensions is " << n << endl;
	cout << "Maximum # of Function Values is " << maxpts << endl;

	cout <<  "  Limits    Lower  Upper  Delta Lower Left of Correlation Matrix " << endl;
	ij = 0;

	/*DO I = 1, N
	         IF ( INFIN(I) .LT. 0 ) THEN
	            PRINT '(I2, '' -infin  infin '', F7.4, 7F9.4)',
	     &           I, DELTA(I), ( CORREL(IJ+J), J = 1,I-1 ), 1.0
	         ELSE IF ( INFIN(I) .EQ. 0 ) THEN
	            PRINT '(I2, '' -infin'', 2F7.4, 1X, 6F9.4)',
	     &           I, UP(I), DELTA(I), ( CORREL(IJ+J), J = 1,I-1 ), 1.0
	         ELSE IF ( INFIN(I) .EQ. 1 ) THEN
	            PRINT '(I2, F7.4, ''  infin '', F7.4, 6F9.4)',
	     &           I, LOW(I), DELTA(I), ( CORREL(IJ+J), J = 1,I-1 ), 1.0
	         ELSE
	            PRINT '(I2, 3F7.4, 1X, 6F9.4)', I, LOW(I),
	     &           UP(I), DELTA(I), ( CORREL(IJ+J), J = 1,I-1 ), 1.0
	         ENDIF
	         IJ = IJ + I-1
	      END DO
	      */
	for (i=0;i<n;i++){
		if(infin[i] < 0){
			cout << "-infin infin" << endl;
		}
	}
	return 0;
}
